{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:33.460884Z",
     "start_time": "2018-10-15T13:38:32.944864Z"
    },
    "collapsed": true,
    "hide_input": false
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "from torch.autograd import Variable\n",
    "from torch.optim.lr_scheduler import StepLR\n",
    "from torch.utils.data import DataLoader,TensorDataset\n",
    "import torch.utils.data as data\n",
    "import numpy as np\n",
    "import scipy.io as sio\n",
    "import math\n",
    "import argparse\n",
    "import random\n",
    "import os\n",
    "from My_Loss import HardTripletLoss\n",
    "from My_Loss import HardTripletLoss2\n",
    "from My_Loss import HardTripletLoss_D\n",
    "from tensorboardX import SummaryWriter\n",
    "import visdom"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:33.464263Z",
     "start_time": "2018-10-15T13:38:33.461893Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "BATCH_SIZE = 64\n",
    "EPISODE = 100000\n",
    "TEST_EPISODE = 1000\n",
    "LEARNING_RATE =1e-5\n",
    "Weight_Deacy = 0\n",
    "GPU = 0\n",
    "Margin = 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:35.749988Z",
     "start_time": "2018-10-15T13:38:33.465670Z"
    },
    "hide_input": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "init dataset\n",
      "----------------------------------------------------------------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "print(\"init dataset\")\n",
    "##################################参数##################################################################\n",
    "dataroot = '../data'\n",
    "dataset = 'AwA1_data'\n",
    "image_embedding = 'res101'               #ResNet101层\n",
    "class_embedding = 'original_att'         #属性表达 85-d\n",
    "#######################################读取视觉特征###################################################################\n",
    "\n",
    "matcontent = sio.loadmat(dataroot + \"/\" + dataset + \"/\" + image_embedding + \".mat\")  #scipy loadmat\n",
    " \n",
    "feature = matcontent['features'].T         #转置 30478x2048 每一行是一个完整的样本\n",
    "\n",
    "label = matcontent['labels'].astype(int).squeeze() - 1   #matlab begin 1 ,numpy begin 0\n",
    "########################################读取属性特征###########################################################\n",
    "\n",
    "matcontent = sio.loadmat(dataroot + \"/\" + dataset + \"/\" + class_embedding + \"_splits.mat\")\n",
    "\n",
    "    \n",
    "# numpy array index starts from 0, matlab starts from 1\n",
    "trainval_loc = matcontent['trainval_loc'].squeeze() - 1    #squeeze()去掉维度中的1 AxBx1 --->AxB\n",
    "\n",
    "test_seen_loc = matcontent['test_seen_loc'].squeeze() - 1\n",
    "test_unseen_loc = matcontent['test_unseen_loc'].squeeze() - 1\n",
    "\n",
    "attribute = matcontent['att'].T    #转置 50x85 每行是整个属性向量\n",
    "\n",
    "x = feature[trainval_loc]                      # train_features trainval里面是图片的编号 begin with 0 ，19832个\n",
    "train_label = label[trainval_loc].astype(int)  # train_label  int类型没变 每个图片的lable 19832个\n",
    "train_id = np.unique(train_label)\n",
    "\n",
    "att = attribute[train_label]                   # train attributes 每个图片的属性 19832个\n",
    "\n",
    "    \n",
    "x_test = feature[test_unseen_loc]                   # test_feature 5685个\n",
    "test_label = label[test_unseen_loc].astype(int)     # test_label   5685个\n",
    "\n",
    "x_test_seen = feature[test_seen_loc]                #test_seen_feature 4958个\n",
    "test_label_seen = label[test_seen_loc].astype(int)  # test_seen_label  4958个\n",
    "    \n",
    "test_id = np.unique(test_label)                     # test_id  10个类 ，unique去重\n",
    "att_pro = attribute[test_id]                        # test_attribute 每一类的属性向量 10x85\n",
    "\n",
    "# train set\n",
    "train_features = torch.from_numpy(x)   #np-->tensor\n",
    "#train_fearures_negative = torch.from_numpy(x_negative)\n",
    "\n",
    "sample_attributes=[]\n",
    "train_label = torch.from_numpy(train_label).unsqueeze(1) #每张图片的属性转化 ，unsqueeze(1)就是插入到第一维度 AxB维-->Ax1xB\n",
    "# attributes\n",
    "all_attributes = np.array(attribute)  #所有50类属性转变为numpy数组???属性向量仍然用的numpy类型 没有转化为pytorch\n",
    "    \n",
    "#print('-'*50)\n",
    "attributes = torch.from_numpy(attribute) \n",
    "#print(attribute)\n",
    "# test set\n",
    "\n",
    "test_features = torch.from_numpy(x_test)\n",
    "#print(test_features.shape)\n",
    "\n",
    "test_label = torch.from_numpy(test_label).unsqueeze(1)\n",
    "#print(test_label.shape)\n",
    "\n",
    "testclasses_id = np.array(test_id)\n",
    "#print(testclasses_id.shape)\n",
    "\n",
    "test_attributes = torch.from_numpy(att_pro).float()\n",
    "#print(test_attributes.shape)\n",
    "\n",
    "test_seen_features = torch.from_numpy(x_test_seen)\n",
    "#print(test_seen_features.shape)\n",
    "\n",
    "test_seen_label = torch.from_numpy(test_label_seen)\n",
    "\n",
    "train_data = TensorDataset( train_label, train_features )\n",
    "#train_data = TensorDataset(train_label, train_features, train_fearures_negative)\n",
    "\n",
    "#################here need new code to make triplet data#####################\n",
    "print('-'*100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:35.753054Z",
     "start_time": "2018-10-15T13:38:35.751115Z"
    },
    "collapsed": true,
    "hide_input": true
   },
   "outputs": [],
   "source": [
    "from my_net_3 import AttributeNetwork\n",
    "from my_net_3 import MetricNetwork"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:37.912478Z",
     "start_time": "2018-10-15T13:38:35.753898Z"
    },
    "hide_input": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "init networks\n",
      "----------------------------------------------------------------------------------------------------\n"
     ]
    }
   ],
   "source": [
    "# init network\n",
    "print(\"init networks\")\n",
    "attribute_network = AttributeNetwork(85,1024,2048)  #85d属性 1024隐藏层 2048输出 85d到2048d\n",
    "metric_network = MetricNetwork(2048,1024,2048)\n",
    "\n",
    "attribute_network.cuda(GPU) \n",
    "metric_network.cuda(GPU)\n",
    "\n",
    "#学习率每200k步 乘0.5\n",
    "attribute_network_optim = torch.optim.Adam(attribute_network.parameters(), lr=LEARNING_RATE,weight_decay=Weight_Deacy)\n",
    "metric_network_optim = torch.optim.Adam(metric_network.parameters(), lr=LEARNING_RATE,weight_decay=Weight_Deacy)\n",
    "#\n",
    "#triplet_network_optim = torch.optim.SGD(triplet_network.parameters(), lr=LEARNING_RATE,momentum=0.9 , \n",
    "#                                         weight_decay=Weight_Deacy)\n",
    "\n",
    "attribute_network_scheduler = StepLR(attribute_network_optim , step_size=20000 , gamma=0.5)\n",
    "metric_network_scheduler = StepLR(metric_network_optim , step_size=20000 , gamma=0.5)\n",
    "#\n",
    "print('-'*100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:37.918639Z",
     "start_time": "2018-10-15T13:38:37.913617Z"
    },
    "collapsed": true,
    "hide_input": true
   },
   "outputs": [],
   "source": [
    "def compute_accuracy(test_features, test_label, test_id, test_attributes):\n",
    "    \n",
    "    test_data = TensorDataset(test_features, test_label)\n",
    "    test_batch = 32\n",
    "    test_loader = DataLoader(test_data, batch_size=test_batch, shuffle=False)\n",
    "    total_rewards = 0\n",
    "\n",
    "    sample_labels = test_id\n",
    "    sample_attributes = test_attributes\n",
    "    class_num = sample_attributes.shape[0]\n",
    "    test_size = test_features.shape[0]\n",
    "\n",
    "    print(\"class num:\", class_num)\n",
    "\n",
    "    for batch_features,batch_labels in test_loader:\n",
    "\n",
    "        batch_size = batch_labels.shape[0]\n",
    "        batch_features_ext = torch.from_numpy(batch_features.numpy().repeat(class_num, 0))\n",
    "        batch_features_ext = metric_network(Variable(batch_features_ext).cuda(GPU).float())  # 32*1024\n",
    "\n",
    "\n",
    "        sample_features = metric_network(attribute_network(Variable(sample_attributes).cuda(GPU).float()))\n",
    "        sample_features_ext = sample_features.repeat(batch_size, 1)\n",
    "\n",
    "\n",
    "        relations = F.pairwise_distance(batch_features_ext, sample_features_ext, 2).view(-1, class_num)\n",
    "        re_batch_labels = []\n",
    "        for label in batch_labels.numpy():\n",
    "            index = np.argwhere(sample_labels == label)\n",
    "            re_batch_labels.append(index[0][0])\n",
    "        re_batch_labels = torch.cuda.LongTensor(re_batch_labels)\n",
    "\n",
    "\n",
    "        _, predict_labels = torch.min(relations.data, 1)\n",
    "        rewards = [1 if predict_labels[j] == re_batch_labels[j] else 0 for j in range(batch_size)]\n",
    "        total_rewards += np.sum(rewards)\n",
    "    test_accuracy = total_rewards/1.0/test_size\n",
    "    return  test_accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2018-10-15T13:38:37.926206Z",
     "start_time": "2018-10-15T13:38:37.919787Z"
    },
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def compute_accuracy_per_class(test_features, test_label, test_id, test_attributes):\n",
    "    \n",
    "    test_data = TensorDataset(test_features, test_label)\n",
    "    test_batch = 32\n",
    "    test_loader = DataLoader(test_data, batch_size=test_batch, shuffle=False)\n",
    "    total_rewards = 0\n",
    "    #print(test_features.size())\n",
    "    sample_labels = test_id\n",
    "    sample_attributes = test_attributes\n",
    "    class_num = sample_attributes.shape[0]\n",
    "    test_size = test_features.shape[0]\n",
    "    per_class_num = np.zeros(class_num)\n",
    "    per_class_true= np.zeros(class_num)\n",
    "\n",
    "    print(\"class num:\", class_num)\n",
    "\n",
    "    for batch_features,batch_labels in test_loader:\n",
    "\n",
    "        batch_size = batch_labels.shape[0]\n",
    "        batch_features_ext = torch.from_numpy(batch_features.numpy().repeat(class_num, 0))\n",
    "        batch_features_ext = metric_network(Variable(batch_features_ext).cuda(GPU).float())  # 32*1024\n",
    "\n",
    "\n",
    "        sample_features = metric_network(attribute_network(Variable(sample_attributes).cuda(GPU).float()))\n",
    "        sample_features_ext = sample_features.repeat(batch_size, 1)\n",
    "\n",
    "\n",
    "        relations = F.pairwise_distance(batch_features_ext, sample_features_ext, 2).view(-1, class_num)\n",
    "        re_batch_labels = []\n",
    "        for label in batch_labels.numpy():\n",
    "            index = np.argwhere(sample_labels == label)\n",
    "            re_batch_labels.append(index[0][0])\n",
    "        re_batch_labels_id, batch_per_num = np.unique(re_batch_labels , return_counts=True) \n",
    "        re_batch_labels = torch.cuda.LongTensor(re_batch_labels)\n",
    "        \n",
    "        for each in range(re_batch_labels_id.size):\n",
    "            #print(re_batch_labels_id[each])\n",
    "            #print(batch_per_num[each])\n",
    "            per_class_num[re_batch_labels_id[each]] = per_class_num[re_batch_labels_id[each]] + batch_per_num[each]\n",
    "        #print(re_batch_labels_id)\n",
    "        #print('-'*100)\n",
    "        #print(batch_per_num)\n",
    "        #print('-'*100)\n",
    "\n",
    "\n",
    "        _, predict_labels = torch.min(relations.data, 1)\n",
    "        for j in range(batch_size):\n",
    "            if predict_labels[j] == re_batch_labels[j]:\n",
    "                per_class_true[re_batch_labels[j]] = per_class_true[re_batch_labels[j]] + 1\n",
    "            \n",
    "    per_accuracy = per_class_true[np.nonzero(per_class_num)] / per_class_num[np.nonzero(per_class_num)]\n",
    "    \n",
    "\n",
    "    test_accuracy = np.sum(per_accuracy)/1.0/np.count_nonzero(per_class_num)\n",
    "   \n",
    "    #print(np.count_nonzero(per_class_num))\n",
    "    return  test_accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "ExecuteTime": {
     "start_time": "2018-10-15T13:38:32.814Z"
    },
    "code_folding": [],
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "training...\n",
      "episode: 1 loss tensor(3.0932, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.12162425891607524\n",
      "gzsl: unseen=0.0000 , seen=0.0245 , h=0.0000\n",
      "____________________________________________________________________________________________________\n",
      "episode: 200 loss tensor(2.9842, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.4264552223507801\n",
      "gzsl: unseen=0.0245 , seen=0.1303 , h=0.0413\n",
      "____________________________________________________________________________________________________\n",
      "episode: 400 loss tensor(2.9290, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.403873122957714\n",
      "gzsl: unseen=0.0186 , seen=0.1516 , h=0.0332\n",
      "____________________________________________________________________________________________________\n",
      "episode: 600 loss tensor(2.9142, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.35240597515640504\n",
      "gzsl: unseen=0.0935 , seen=0.2713 , h=0.1391\n",
      "____________________________________________________________________________________________________\n",
      "episode: 800 loss tensor(2.8159, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.38900947629920946\n",
      "gzsl: unseen=0.1644 , seen=0.3691 , h=0.2275\n",
      "____________________________________________________________________________________________________\n",
      "episode: 1000 loss tensor(2.7587, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.3931521074356983\n",
      "gzsl: unseen=0.2189 , seen=0.4413 , h=0.2926\n",
      "____________________________________________________________________________________________________\n",
      "episode: 1200 loss tensor(2.6305, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.4157826622584735\n",
      "gzsl: unseen=0.2482 , seen=0.5247 , h=0.3370\n",
      "____________________________________________________________________________________________________\n",
      "episode: 1400 loss tensor(2.5228, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.44728632480308156\n",
      "gzsl: unseen=0.3178 , seen=0.5469 , h=0.4020\n",
      "____________________________________________________________________________________________________\n",
      "episode: 1600 loss tensor(2.5207, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5164228547453116\n",
      "gzsl: unseen=0.3680 , seen=0.6025 , h=0.4569\n",
      "____________________________________________________________________________________________________\n",
      "episode: 1800 loss tensor(2.5108, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5004978305198924\n",
      "gzsl: unseen=0.3691 , seen=0.6332 , h=0.4664\n",
      "____________________________________________________________________________________________________\n",
      "episode: 2000 loss tensor(2.2904, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5446106017867157\n",
      "gzsl: unseen=0.4312 , seen=0.6266 , h=0.5108\n",
      "____________________________________________________________________________________________________\n",
      "episode: 2200 loss tensor(2.3168, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5652100002042255\n",
      "gzsl: unseen=0.4373 , seen=0.6459 , h=0.5215\n",
      "____________________________________________________________________________________________________\n",
      "episode: 2400 loss tensor(2.0563, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5819967211479986\n",
      "gzsl: unseen=0.4617 , seen=0.6510 , h=0.5402\n",
      "____________________________________________________________________________________________________\n",
      "episode: 2600 loss tensor(2.1596, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5650300205502725\n",
      "gzsl: unseen=0.4408 , seen=0.6648 , h=0.5301\n",
      "____________________________________________________________________________________________________\n",
      "episode: 2800 loss tensor(2.2277, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5707244183546795\n",
      "gzsl: unseen=0.4682 , seen=0.6672 , h=0.5503\n",
      "____________________________________________________________________________________________________\n",
      "episode: 3000 loss tensor(2.0394, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5998063801785657\n",
      "gzsl: unseen=0.4814 , seen=0.6678 , h=0.5595\n",
      "____________________________________________________________________________________________________\n",
      "episode: 3200 loss tensor(1.8624, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.5998822287505834\n",
      "gzsl: unseen=0.4773 , seen=0.6705 , h=0.5576\n",
      "____________________________________________________________________________________________________\n",
      "episode: 3400 loss tensor(2.2711, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6119853832342534\n",
      "gzsl: unseen=0.4991 , seen=0.6784 , h=0.5751\n",
      "____________________________________________________________________________________________________\n",
      "episode: 3600 loss tensor(2.0324, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6289083749938991\n",
      "gzsl: unseen=0.5089 , seen=0.6814 , h=0.5826\n",
      "____________________________________________________________________________________________________\n",
      "episode: 3800 loss tensor(2.1519, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6414157144654229\n",
      "gzsl: unseen=0.5247 , seen=0.6829 , h=0.5935\n",
      "____________________________________________________________________________________________________\n",
      "episode: 4000 loss tensor(1.9202, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6292793017605378\n",
      "gzsl: unseen=0.5193 , seen=0.6876 , h=0.5918\n",
      "____________________________________________________________________________________________________\n",
      "episode: 4200 loss tensor(2.0887, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6472689187705712\n",
      "gzsl: unseen=0.5337 , seen=0.6836 , h=0.5994\n",
      "____________________________________________________________________________________________________\n",
      "episode: 4400 loss tensor(2.1827, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6519872956127039\n",
      "gzsl: unseen=0.5402 , seen=0.6951 , h=0.6079\n",
      "____________________________________________________________________________________________________\n",
      "episode: 4600 loss tensor(2.4771, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6237761388322578\n",
      "gzsl: unseen=0.5088 , seen=0.7056 , h=0.5912\n",
      "____________________________________________________________________________________________________\n",
      "episode: 4800 loss tensor(1.7139, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.634320994145255\n",
      "gzsl: unseen=0.5102 , seen=0.7014 , h=0.5907\n",
      "____________________________________________________________________________________________________\n",
      "episode: 5000 loss tensor(2.0482, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6398313865155374\n",
      "gzsl: unseen=0.5105 , seen=0.7057 , h=0.5924\n",
      "____________________________________________________________________________________________________\n",
      "episode: 5200 loss tensor(1.7330, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6377051469712851\n",
      "gzsl: unseen=0.5177 , seen=0.7151 , h=0.6006\n",
      "____________________________________________________________________________________________________\n",
      "episode: 5400 loss tensor(1.9971, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6622359952164942\n",
      "gzsl: unseen=0.5338 , seen=0.7112 , h=0.6098\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 5600 loss tensor(1.9128, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6538143415634057\n",
      "gzsl: unseen=0.5271 , seen=0.7122 , h=0.6058\n",
      "____________________________________________________________________________________________________\n",
      "episode: 5800 loss tensor(1.3677, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6481596888012753\n",
      "gzsl: unseen=0.5203 , seen=0.7103 , h=0.6006\n",
      "____________________________________________________________________________________________________\n",
      "episode: 6000 loss tensor(1.7895, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6575590424229515\n",
      "gzsl: unseen=0.5288 , seen=0.7195 , h=0.6096\n",
      "____________________________________________________________________________________________________\n",
      "episode: 6200 loss tensor(1.8735, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6389102382388814\n",
      "gzsl: unseen=0.5136 , seen=0.7227 , h=0.6005\n",
      "____________________________________________________________________________________________________\n",
      "episode: 6400 loss tensor(1.9973, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6529760906932421\n",
      "gzsl: unseen=0.5264 , seen=0.7196 , h=0.6080\n",
      "____________________________________________________________________________________________________\n",
      "episode: 6600 loss tensor(1.2718, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6586423866371114\n",
      "gzsl: unseen=0.5377 , seen=0.7171 , h=0.6145\n",
      "____________________________________________________________________________________________________\n",
      "episode: 6800 loss tensor(1.9188, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6536753618738709\n",
      "gzsl: unseen=0.5290 , seen=0.7225 , h=0.6108\n",
      "____________________________________________________________________________________________________\n",
      "episode: 7000 loss tensor(1.9827, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.640182622197307\n",
      "gzsl: unseen=0.5146 , seen=0.7251 , h=0.6020\n",
      "____________________________________________________________________________________________________\n",
      "episode: 7200 loss tensor(1.9552, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6720130717880846\n",
      "gzsl: unseen=0.5423 , seen=0.7227 , h=0.6197\n",
      "____________________________________________________________________________________________________\n",
      "episode: 7400 loss tensor(1.7344, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6491931473588743\n",
      "gzsl: unseen=0.5257 , seen=0.7352 , h=0.6131\n",
      "____________________________________________________________________________________________________\n",
      "episode: 7600 loss tensor(1.0421, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6594047325672299\n",
      "gzsl: unseen=0.5265 , seen=0.7302 , h=0.6118\n",
      "____________________________________________________________________________________________________\n",
      "episode: 7800 loss tensor(1.9090, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6683965606357789\n",
      "gzsl: unseen=0.5390 , seen=0.7299 , h=0.6201\n",
      "____________________________________________________________________________________________________\n",
      "episode: 8000 loss tensor(1.5630, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6669285869688635\n",
      "gzsl: unseen=0.5284 , seen=0.7373 , h=0.6156\n",
      "____________________________________________________________________________________________________\n",
      "episode: 8200 loss tensor(1.3803, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6704995169491339\n",
      "gzsl: unseen=0.5341 , seen=0.7462 , h=0.6226\n",
      "____________________________________________________________________________________________________\n",
      "episode: 8400 loss tensor(0.9479, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6603810959923934\n",
      "gzsl: unseen=0.5334 , seen=0.7347 , h=0.6181\n",
      "____________________________________________________________________________________________________\n",
      "episode: 8600 loss tensor(1.5260, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6506338572099337\n",
      "gzsl: unseen=0.5217 , seen=0.7389 , h=0.6116\n",
      "____________________________________________________________________________________________________\n",
      "episode: 8800 loss tensor(1.1192, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6712283742988222\n",
      "gzsl: unseen=0.5379 , seen=0.7388 , h=0.6226\n",
      "____________________________________________________________________________________________________\n",
      "episode: 9000 loss tensor(1.6862, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6529922616868513\n",
      "gzsl: unseen=0.5175 , seen=0.7402 , h=0.6091\n",
      "____________________________________________________________________________________________________\n",
      "episode: 9200 loss tensor(2.0209, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6675176598883492\n",
      "gzsl: unseen=0.5312 , seen=0.7435 , h=0.6197\n",
      "____________________________________________________________________________________________________\n",
      "episode: 9400 loss tensor(1.8662, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6549148997737806\n",
      "gzsl: unseen=0.5247 , seen=0.7504 , h=0.6176\n",
      "____________________________________________________________________________________________________\n",
      "episode: 9600 loss tensor(2.0109, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6732242975495802\n",
      "gzsl: unseen=0.5354 , seen=0.7488 , h=0.6243\n",
      "____________________________________________________________________________________________________\n",
      "episode: 9800 loss tensor(1.9193, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.678144707604119\n",
      "gzsl: unseen=0.5405 , seen=0.7364 , h=0.6234\n",
      "____________________________________________________________________________________________________\n",
      "episode: 10000 loss tensor(1.5659, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6682769796717424\n",
      "gzsl: unseen=0.5223 , seen=0.7474 , h=0.6149\n",
      "____________________________________________________________________________________________________\n",
      "episode: 10200 loss tensor(2.0976, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6561881645586262\n",
      "gzsl: unseen=0.5233 , seen=0.7539 , h=0.6178\n",
      "____________________________________________________________________________________________________\n",
      "episode: 10400 loss tensor(1.8263, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6677206917104268\n",
      "gzsl: unseen=0.5220 , seen=0.7586 , h=0.6184\n",
      "____________________________________________________________________________________________________\n",
      "episode: 10600 loss tensor(1.6170, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6709928873871043\n",
      "gzsl: unseen=0.5245 , seen=0.7582 , h=0.6200\n",
      "____________________________________________________________________________________________________\n",
      "episode: 10800 loss tensor(1.9861, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.668780339699817\n",
      "gzsl: unseen=0.5201 , seen=0.7500 , h=0.6143\n",
      "____________________________________________________________________________________________________\n",
      "episode: 11000 loss tensor(1.2497, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6682656602437502\n",
      "gzsl: unseen=0.5282 , seen=0.7559 , h=0.6218\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 11200 loss tensor(1.7958, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6762303508647435\n",
      "gzsl: unseen=0.5423 , seen=0.7595 , h=0.6327\n",
      "____________________________________________________________________________________________________\n",
      "episode: 11400 loss tensor(1.0485, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6836909355516853\n",
      "gzsl: unseen=0.5526 , seen=0.7578 , h=0.6391\n",
      "____________________________________________________________________________________________________\n",
      "episode: 11600 loss tensor(1.9172, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6780485153051883\n",
      "gzsl: unseen=0.5393 , seen=0.7536 , h=0.6287\n",
      "____________________________________________________________________________________________________\n",
      "episode: 11800 loss tensor(1.2086, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6848067190718568\n",
      "gzsl: unseen=0.5388 , seen=0.7651 , h=0.6323\n",
      "____________________________________________________________________________________________________\n",
      "episode: 12000 loss tensor(1.8246, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.66985255048858\n",
      "gzsl: unseen=0.5210 , seen=0.7653 , h=0.6200\n",
      "____________________________________________________________________________________________________\n",
      "episode: 12200 loss tensor(1.6721, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.673159527235569\n",
      "gzsl: unseen=0.5339 , seen=0.7616 , h=0.6277\n",
      "____________________________________________________________________________________________________\n",
      "episode: 12400 loss tensor(1.7287, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6577246603243665\n",
      "gzsl: unseen=0.5141 , seen=0.7612 , h=0.6137\n",
      "____________________________________________________________________________________________________\n",
      "episode: 12600 loss tensor(1.7697, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6628935466464909\n",
      "gzsl: unseen=0.5247 , seen=0.7643 , h=0.6222\n",
      "____________________________________________________________________________________________________\n",
      "episode: 12800 loss tensor(2.2885, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6697996607589871\n",
      "gzsl: unseen=0.5259 , seen=0.7605 , h=0.6218\n",
      "____________________________________________________________________________________________________\n",
      "episode: 13000 loss tensor(1.8028, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6609865104865428\n",
      "gzsl: unseen=0.5119 , seen=0.7678 , h=0.6143\n",
      "____________________________________________________________________________________________________\n",
      "episode: 13200 loss tensor(1.8754, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6706757018943011\n",
      "gzsl: unseen=0.5361 , seen=0.7697 , h=0.6320\n",
      "____________________________________________________________________________________________________\n",
      "episode: 13400 loss tensor(1.0802, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6664685316889066\n",
      "gzsl: unseen=0.5303 , seen=0.7659 , h=0.6267\n",
      "____________________________________________________________________________________________________\n",
      "episode: 13600 loss tensor(1.8254, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6733629194673731\n",
      "gzsl: unseen=0.5274 , seen=0.7671 , h=0.6251\n",
      "____________________________________________________________________________________________________\n",
      "episode: 13800 loss tensor(1.8054, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6666670609156644\n",
      "gzsl: unseen=0.5247 , seen=0.7777 , h=0.6266\n",
      "____________________________________________________________________________________________________\n",
      "episode: 14000 loss tensor(1.4932, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6589058837005078\n",
      "gzsl: unseen=0.5278 , seen=0.7686 , h=0.6258\n",
      "____________________________________________________________________________________________________\n",
      "episode: 14200 loss tensor(2.0249, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6696489679168663\n",
      "gzsl: unseen=0.5313 , seen=0.7676 , h=0.6279\n",
      "____________________________________________________________________________________________________\n",
      "episode: 14400 loss tensor(1.1541, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6543270445619683\n",
      "gzsl: unseen=0.5289 , seen=0.7611 , h=0.6241\n",
      "____________________________________________________________________________________________________\n",
      "episode: 14600 loss tensor(2.2427, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6634930957440455\n",
      "gzsl: unseen=0.5137 , seen=0.7683 , h=0.6157\n",
      "____________________________________________________________________________________________________\n",
      "episode: 14800 loss tensor(1.6479, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6695042061202482\n",
      "gzsl: unseen=0.5129 , seen=0.7757 , h=0.6175\n",
      "____________________________________________________________________________________________________\n",
      "episode: 15000 loss tensor(2.0264, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6742295922907412\n",
      "gzsl: unseen=0.5268 , seen=0.7786 , h=0.6284\n",
      "____________________________________________________________________________________________________\n",
      "episode: 15200 loss tensor(1.1614, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6627468730020342\n",
      "gzsl: unseen=0.5245 , seen=0.7615 , h=0.6212\n",
      "____________________________________________________________________________________________________\n",
      "episode: 15400 loss tensor(2.3485, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6448833049347247\n",
      "gzsl: unseen=0.5048 , seen=0.7658 , h=0.6085\n",
      "____________________________________________________________________________________________________\n",
      "episode: 15600 loss tensor(1.3226, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6495649444804447\n",
      "gzsl: unseen=0.4910 , seen=0.7690 , h=0.5993\n",
      "____________________________________________________________________________________________________\n",
      "episode: 15800 loss tensor(1.5413, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6557182222145599\n",
      "gzsl: unseen=0.5069 , seen=0.7666 , h=0.6102\n",
      "____________________________________________________________________________________________________\n",
      "episode: 16000 loss tensor(1.9604, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6560396666890207\n",
      "gzsl: unseen=0.5088 , seen=0.7674 , h=0.6119\n",
      "____________________________________________________________________________________________________\n",
      "episode: 16200 loss tensor(1.8302, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6656814607851063\n",
      "gzsl: unseen=0.5214 , seen=0.7660 , h=0.6204\n",
      "____________________________________________________________________________________________________\n",
      "episode: 16400 loss tensor(2.0185, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6566470413286888\n",
      "gzsl: unseen=0.5042 , seen=0.7673 , h=0.6086\n",
      "____________________________________________________________________________________________________\n",
      "episode: 16600 loss tensor(1.8162, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6349178281445418\n",
      "gzsl: unseen=0.4857 , seen=0.7773 , h=0.5978\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 16800 loss tensor(1.7022, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6582300762163981\n",
      "gzsl: unseen=0.5083 , seen=0.7725 , h=0.6131\n",
      "____________________________________________________________________________________________________\n",
      "episode: 17000 loss tensor(2.9063, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.653396677230081\n",
      "gzsl: unseen=0.5225 , seen=0.7644 , h=0.6207\n",
      "____________________________________________________________________________________________________\n",
      "episode: 17200 loss tensor(1.6712, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6546823248016352\n",
      "gzsl: unseen=0.5125 , seen=0.7769 , h=0.6176\n",
      "____________________________________________________________________________________________________\n",
      "episode: 17400 loss tensor(2.2994, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.654218409629982\n",
      "gzsl: unseen=0.5108 , seen=0.7662 , h=0.6129\n",
      "____________________________________________________________________________________________________\n",
      "episode: 17600 loss tensor(1.9647, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6417550642145019\n",
      "gzsl: unseen=0.4883 , seen=0.7723 , h=0.5983\n",
      "____________________________________________________________________________________________________\n",
      "episode: 17800 loss tensor(2.1463, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6522405953060989\n",
      "gzsl: unseen=0.5115 , seen=0.7671 , h=0.6138\n",
      "____________________________________________________________________________________________________\n",
      "episode: 18000 loss tensor(1.1081, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.658645946459701\n",
      "gzsl: unseen=0.4957 , seen=0.7847 , h=0.6076\n",
      "____________________________________________________________________________________________________\n",
      "episode: 18200 loss tensor(0.9903, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6528616765613291\n",
      "gzsl: unseen=0.5231 , seen=0.7736 , h=0.6241\n",
      "____________________________________________________________________________________________________\n",
      "episode: 18400 loss tensor(1.9563, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6445142132496501\n",
      "gzsl: unseen=0.4962 , seen=0.7701 , h=0.6035\n",
      "____________________________________________________________________________________________________\n",
      "episode: 18600 loss tensor(1.7161, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6453073227883029\n",
      "gzsl: unseen=0.4969 , seen=0.7740 , h=0.6052\n",
      "____________________________________________________________________________________________________\n",
      "episode: 18800 loss tensor(0.9371, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6583274468672573\n",
      "gzsl: unseen=0.5127 , seen=0.7772 , h=0.6179\n",
      "____________________________________________________________________________________________________\n",
      "episode: 19000 loss tensor(1.0090, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6646711055336376\n",
      "gzsl: unseen=0.5160 , seen=0.7756 , h=0.6198\n",
      "____________________________________________________________________________________________________\n",
      "episode: 19200 loss tensor(2.2184, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6379310799835813\n",
      "gzsl: unseen=0.4926 , seen=0.7732 , h=0.6018\n",
      "____________________________________________________________________________________________________\n",
      "episode: 19400 loss tensor(1.3993, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6569171757031919\n",
      "gzsl: unseen=0.5071 , seen=0.7792 , h=0.6144\n",
      "____________________________________________________________________________________________________\n",
      "episode: 19600 loss tensor(1.1867, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6527405250933279\n",
      "gzsl: unseen=0.4891 , seen=0.7897 , h=0.6041\n",
      "____________________________________________________________________________________________________\n",
      "episode: 19800 loss tensor(1.6092, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6561071661753319\n",
      "gzsl: unseen=0.5177 , seen=0.7762 , h=0.6211\n",
      "____________________________________________________________________________________________________\n",
      "episode: 20000 loss tensor(3.2077, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6557253183147461\n",
      "gzsl: unseen=0.5284 , seen=0.7798 , h=0.6299\n",
      "____________________________________________________________________________________________________\n",
      "episode: 20200 loss tensor(0.6486, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6479298744952537\n",
      "gzsl: unseen=0.5110 , seen=0.7778 , h=0.6168\n",
      "____________________________________________________________________________________________________\n",
      "episode: 20400 loss tensor(1.3431, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6567391565129255\n",
      "gzsl: unseen=0.5084 , seen=0.7721 , h=0.6131\n",
      "____________________________________________________________________________________________________\n",
      "episode: 20600 loss tensor(1.2964, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6523252367643957\n",
      "gzsl: unseen=0.5083 , seen=0.7742 , h=0.6137\n",
      "____________________________________________________________________________________________________\n",
      "episode: 20800 loss tensor(1.2071, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6561527294804794\n",
      "gzsl: unseen=0.5293 , seen=0.7783 , h=0.6301\n",
      "____________________________________________________________________________________________________\n",
      "episode: 21000 loss tensor(1.0078, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6613739321624097\n",
      "gzsl: unseen=0.5082 , seen=0.7773 , h=0.6146\n",
      "____________________________________________________________________________________________________\n",
      "episode: 21200 loss tensor(2.0650, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6675720574675864\n",
      "gzsl: unseen=0.5121 , seen=0.7778 , h=0.6176\n",
      "____________________________________________________________________________________________________\n",
      "episode: 21400 loss tensor(0.9775, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6604169727993727\n",
      "gzsl: unseen=0.4999 , seen=0.7797 , h=0.6092\n",
      "____________________________________________________________________________________________________\n",
      "episode: 21600 loss tensor(1.7661, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6583023797658398\n",
      "gzsl: unseen=0.5021 , seen=0.7890 , h=0.6137\n",
      "____________________________________________________________________________________________________\n",
      "episode: 21800 loss tensor(2.0390, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6530440923227097\n",
      "gzsl: unseen=0.4937 , seen=0.7831 , h=0.6056\n",
      "____________________________________________________________________________________________________\n",
      "episode: 22000 loss tensor(1.1453, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.65350378993573\n",
      "gzsl: unseen=0.4976 , seen=0.7806 , h=0.6077\n",
      "____________________________________________________________________________________________________\n",
      "episode: 22200 loss tensor(1.2354, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6573609031465238\n",
      "gzsl: unseen=0.5084 , seen=0.7780 , h=0.6150\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 22400 loss tensor(1.7417, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6560806570596208\n",
      "gzsl: unseen=0.5039 , seen=0.7779 , h=0.6116\n",
      "____________________________________________________________________________________________________\n",
      "episode: 22600 loss tensor(1.0504, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6467961377729365\n",
      "gzsl: unseen=0.5045 , seen=0.7801 , h=0.6128\n",
      "____________________________________________________________________________________________________\n",
      "episode: 22800 loss tensor(1.6452, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6439103001677999\n",
      "gzsl: unseen=0.4963 , seen=0.7816 , h=0.6071\n",
      "____________________________________________________________________________________________________\n",
      "episode: 23000 loss tensor(1.8151, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6474567685858582\n",
      "gzsl: unseen=0.5036 , seen=0.7792 , h=0.6118\n",
      "____________________________________________________________________________________________________\n",
      "episode: 23200 loss tensor(1.3363, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6432755078687828\n",
      "gzsl: unseen=0.4972 , seen=0.7806 , h=0.6075\n",
      "____________________________________________________________________________________________________\n",
      "episode: 23400 loss tensor(2.2557, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6473864654144786\n",
      "gzsl: unseen=0.4997 , seen=0.7879 , h=0.6115\n",
      "____________________________________________________________________________________________________\n",
      "episode: 23600 loss tensor(2.1934, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6429260463383961\n",
      "gzsl: unseen=0.4996 , seen=0.7831 , h=0.6100\n",
      "____________________________________________________________________________________________________\n",
      "episode: 23800 loss tensor(2.1971, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6450540759069995\n",
      "gzsl: unseen=0.4913 , seen=0.7819 , h=0.6034\n",
      "____________________________________________________________________________________________________\n",
      "episode: 24000 loss tensor(2.0538, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6531262365276198\n",
      "gzsl: unseen=0.5002 , seen=0.7836 , h=0.6106\n",
      "____________________________________________________________________________________________________\n",
      "episode: 24200 loss tensor(2.2583, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6516348759264348\n",
      "gzsl: unseen=0.5121 , seen=0.7694 , h=0.6149\n",
      "____________________________________________________________________________________________________\n",
      "episode: 24400 loss tensor(2.0327, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6499580494075896\n",
      "gzsl: unseen=0.4957 , seen=0.7818 , h=0.6067\n",
      "____________________________________________________________________________________________________\n",
      "episode: 24600 loss tensor(1.3745, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6413923419584242\n",
      "gzsl: unseen=0.4969 , seen=0.7818 , h=0.6076\n",
      "____________________________________________________________________________________________________\n",
      "episode: 24800 loss tensor(1.6254, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6443700641575403\n",
      "gzsl: unseen=0.4992 , seen=0.7771 , h=0.6079\n",
      "____________________________________________________________________________________________________\n",
      "episode: 25000 loss tensor(2.4002, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.644398648118133\n",
      "gzsl: unseen=0.5047 , seen=0.7846 , h=0.6142\n",
      "____________________________________________________________________________________________________\n",
      "episode: 25200 loss tensor(1.1148, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6445730539816081\n",
      "gzsl: unseen=0.5153 , seen=0.7812 , h=0.6210\n",
      "____________________________________________________________________________________________________\n",
      "episode: 25400 loss tensor(1.6881, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.64270649141008\n",
      "gzsl: unseen=0.4933 , seen=0.7817 , h=0.6049\n",
      "____________________________________________________________________________________________________\n",
      "episode: 25600 loss tensor(1.2779, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6370004777491314\n",
      "gzsl: unseen=0.4874 , seen=0.7821 , h=0.6006\n",
      "____________________________________________________________________________________________________\n",
      "episode: 25800 loss tensor(1.7338, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6470125574288491\n",
      "gzsl: unseen=0.5010 , seen=0.7837 , h=0.6112\n",
      "____________________________________________________________________________________________________\n",
      "episode: 26000 loss tensor(0.9499, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6485238559692135\n",
      "gzsl: unseen=0.5005 , seen=0.7818 , h=0.6103\n",
      "____________________________________________________________________________________________________\n",
      "episode: 26200 loss tensor(2.4440, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6508549259154857\n",
      "gzsl: unseen=0.4936 , seen=0.7896 , h=0.6075\n",
      "____________________________________________________________________________________________________\n",
      "episode: 26400 loss tensor(2.2670, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6359700439848447\n",
      "gzsl: unseen=0.4913 , seen=0.7794 , h=0.6027\n",
      "____________________________________________________________________________________________________\n",
      "episode: 26600 loss tensor(1.5452, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.641158354143099\n",
      "gzsl: unseen=0.4984 , seen=0.7834 , h=0.6092\n",
      "____________________________________________________________________________________________________\n",
      "episode: 26800 loss tensor(1.3062, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6472670503869874\n",
      "gzsl: unseen=0.4924 , seen=0.7886 , h=0.6063\n",
      "____________________________________________________________________________________________________\n",
      "episode: 27000 loss tensor(1.7075, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6549987807863966\n",
      "gzsl: unseen=0.4947 , seen=0.7865 , h=0.6074\n",
      "____________________________________________________________________________________________________\n",
      "episode: 27200 loss tensor(1.6873, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6501639006998017\n",
      "gzsl: unseen=0.4982 , seen=0.7893 , h=0.6109\n",
      "____________________________________________________________________________________________________\n",
      "episode: 27400 loss tensor(1.9517, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6444728291623051\n",
      "gzsl: unseen=0.4967 , seen=0.7821 , h=0.6076\n",
      "____________________________________________________________________________________________________\n",
      "episode: 27600 loss tensor(1.6747, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6463192153035205\n",
      "gzsl: unseen=0.4945 , seen=0.7737 , h=0.6034\n",
      "____________________________________________________________________________________________________\n",
      "episode: 27800 loss tensor(2.1524, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6512859082963379\n",
      "gzsl: unseen=0.5051 , seen=0.7916 , h=0.6167\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 28000 loss tensor(1.0251, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6501223141009376\n",
      "gzsl: unseen=0.4982 , seen=0.7800 , h=0.6081\n",
      "____________________________________________________________________________________________________\n",
      "episode: 28200 loss tensor(0.6382, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6523651374368649\n",
      "gzsl: unseen=0.4984 , seen=0.7797 , h=0.6081\n",
      "____________________________________________________________________________________________________\n",
      "episode: 28400 loss tensor(1.5387, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6459887205982552\n",
      "gzsl: unseen=0.5010 , seen=0.7808 , h=0.6104\n",
      "____________________________________________________________________________________________________\n",
      "episode: 28600 loss tensor(1.6527, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6351516353972673\n",
      "gzsl: unseen=0.4987 , seen=0.7875 , h=0.6107\n",
      "____________________________________________________________________________________________________\n",
      "episode: 28800 loss tensor(0.5285, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6384284923303911\n",
      "gzsl: unseen=0.4920 , seen=0.7832 , h=0.6043\n",
      "____________________________________________________________________________________________________\n",
      "episode: 29000 loss tensor(1.5487, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6486146196217473\n",
      "gzsl: unseen=0.4899 , seen=0.7876 , h=0.6041\n",
      "____________________________________________________________________________________________________\n",
      "episode: 29200 loss tensor(1.2882, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6475251832712601\n",
      "gzsl: unseen=0.5038 , seen=0.7829 , h=0.6131\n",
      "____________________________________________________________________________________________________\n",
      "episode: 29400 loss tensor(1.5622, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6499814154594267\n",
      "gzsl: unseen=0.4983 , seen=0.7814 , h=0.6085\n",
      "____________________________________________________________________________________________________\n",
      "episode: 29600 loss tensor(2.0307, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6410842282942116\n",
      "gzsl: unseen=0.4865 , seen=0.7811 , h=0.5996\n",
      "____________________________________________________________________________________________________\n",
      "episode: 29800 loss tensor(3.1374, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6481151320596772\n",
      "gzsl: unseen=0.4968 , seen=0.7885 , h=0.6095\n",
      "____________________________________________________________________________________________________\n",
      "episode: 30000 loss tensor(2.4526, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6399386291877186\n",
      "gzsl: unseen=0.4815 , seen=0.7886 , h=0.5980\n",
      "____________________________________________________________________________________________________\n",
      "episode: 30200 loss tensor(1.6853, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6396502198603655\n",
      "gzsl: unseen=0.4841 , seen=0.7900 , h=0.6003\n",
      "____________________________________________________________________________________________________\n",
      "episode: 30400 loss tensor(0.7209, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6426108408897991\n",
      "gzsl: unseen=0.4955 , seen=0.7790 , h=0.6057\n",
      "____________________________________________________________________________________________________\n",
      "episode: 30600 loss tensor(1.4500, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6404846399671269\n",
      "gzsl: unseen=0.4921 , seen=0.7858 , h=0.6052\n",
      "____________________________________________________________________________________________________\n",
      "episode: 30800 loss tensor(0.5180, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6432067367831087\n",
      "gzsl: unseen=0.4888 , seen=0.7849 , h=0.6025\n",
      "____________________________________________________________________________________________________\n",
      "episode: 31000 loss tensor(1.6332, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.643198266829786\n",
      "gzsl: unseen=0.4849 , seen=0.7868 , h=0.6000\n",
      "____________________________________________________________________________________________________\n",
      "episode: 31200 loss tensor(2.3690, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.639425126069218\n",
      "gzsl: unseen=0.4833 , seen=0.7903 , h=0.5998\n",
      "____________________________________________________________________________________________________\n",
      "episode: 31400 loss tensor(0.9290, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6341226123729365\n",
      "gzsl: unseen=0.4892 , seen=0.7881 , h=0.6037\n",
      "____________________________________________________________________________________________________\n",
      "episode: 31600 loss tensor(1.0795, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6324770012220559\n",
      "gzsl: unseen=0.4815 , seen=0.7897 , h=0.5983\n",
      "____________________________________________________________________________________________________\n",
      "episode: 31800 loss tensor(1.3858, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6368354064567068\n",
      "gzsl: unseen=0.4971 , seen=0.7902 , h=0.6103\n",
      "____________________________________________________________________________________________________\n",
      "episode: 32000 loss tensor(2.1247, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6379157394318414\n",
      "gzsl: unseen=0.4871 , seen=0.7889 , h=0.6023\n",
      "____________________________________________________________________________________________________\n",
      "episode: 32200 loss tensor(2.3736, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6352324503236726\n",
      "gzsl: unseen=0.4834 , seen=0.7918 , h=0.6003\n",
      "____________________________________________________________________________________________________\n",
      "episode: 32400 loss tensor(1.6134, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6400881667493037\n",
      "gzsl: unseen=0.4876 , seen=0.7826 , h=0.6008\n",
      "____________________________________________________________________________________________________\n",
      "episode: 32600 loss tensor(1.0129, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6343786999895318\n",
      "gzsl: unseen=0.4871 , seen=0.7875 , h=0.6019\n",
      "____________________________________________________________________________________________________\n",
      "episode: 32800 loss tensor(2.9755, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6392520741545579\n",
      "gzsl: unseen=0.4964 , seen=0.7802 , h=0.6068\n",
      "____________________________________________________________________________________________________\n",
      "episode: 33000 loss tensor(1.1616, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6301896951595269\n",
      "gzsl: unseen=0.4787 , seen=0.7774 , h=0.5925\n",
      "____________________________________________________________________________________________________\n",
      "episode: 33200 loss tensor(1.8015, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6372589625889844\n",
      "gzsl: unseen=0.4771 , seen=0.7883 , h=0.5944\n",
      "____________________________________________________________________________________________________\n",
      "episode: 33400 loss tensor(2.4680, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6389512119846581\n",
      "gzsl: unseen=0.4947 , seen=0.7890 , h=0.6081\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 33600 loss tensor(1.1502, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.639896743469849\n",
      "gzsl: unseen=0.4897 , seen=0.7887 , h=0.6042\n",
      "____________________________________________________________________________________________________\n",
      "episode: 33800 loss tensor(2.7270, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6321680404503458\n",
      "gzsl: unseen=0.4790 , seen=0.7829 , h=0.5943\n",
      "____________________________________________________________________________________________________\n",
      "episode: 34000 loss tensor(1.0650, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6393539529449049\n",
      "gzsl: unseen=0.4978 , seen=0.7871 , h=0.6099\n",
      "____________________________________________________________________________________________________\n",
      "episode: 34200 loss tensor(1.8904, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6329537792828049\n",
      "gzsl: unseen=0.4762 , seen=0.7871 , h=0.5934\n",
      "____________________________________________________________________________________________________\n",
      "episode: 34400 loss tensor(1.8814, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6302138272632287\n",
      "gzsl: unseen=0.4800 , seen=0.7916 , h=0.5976\n",
      "____________________________________________________________________________________________________\n",
      "episode: 34600 loss tensor(1.6248, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6247196340077366\n",
      "gzsl: unseen=0.4789 , seen=0.7843 , h=0.5947\n",
      "____________________________________________________________________________________________________\n",
      "episode: 34800 loss tensor(1.5286, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6383593090650306\n",
      "gzsl: unseen=0.4948 , seen=0.7754 , h=0.6041\n",
      "____________________________________________________________________________________________________\n",
      "episode: 35000 loss tensor(0.8506, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6362099515860623\n",
      "gzsl: unseen=0.4814 , seen=0.7814 , h=0.5958\n",
      "____________________________________________________________________________________________________\n",
      "episode: 35200 loss tensor(1.6727, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6355638571891873\n",
      "gzsl: unseen=0.4908 , seen=0.7796 , h=0.6024\n",
      "____________________________________________________________________________________________________\n",
      "episode: 35400 loss tensor(1.0597, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6385829732423793\n",
      "gzsl: unseen=0.4758 , seen=0.7922 , h=0.5945\n",
      "____________________________________________________________________________________________________\n",
      "episode: 35600 loss tensor(0.9196, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6364477378207659\n",
      "gzsl: unseen=0.4739 , seen=0.7881 , h=0.5919\n",
      "____________________________________________________________________________________________________\n",
      "episode: 35800 loss tensor(1.2587, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6441764652602419\n",
      "gzsl: unseen=0.4836 , seen=0.7873 , h=0.5992\n",
      "____________________________________________________________________________________________________\n",
      "episode: 36000 loss tensor(0.9476, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6363099470057917\n",
      "gzsl: unseen=0.4958 , seen=0.7893 , h=0.6090\n",
      "____________________________________________________________________________________________________\n",
      "episode: 36200 loss tensor(1.4456, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6448870967559219\n",
      "gzsl: unseen=0.4903 , seen=0.7864 , h=0.6040\n",
      "____________________________________________________________________________________________________\n",
      "episode: 36400 loss tensor(1.6433, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6329863379026192\n",
      "gzsl: unseen=0.4825 , seen=0.7907 , h=0.5993\n",
      "____________________________________________________________________________________________________\n",
      "episode: 36600 loss tensor(1.3803, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6337148065654447\n",
      "gzsl: unseen=0.4775 , seen=0.7889 , h=0.5949\n",
      "____________________________________________________________________________________________________\n",
      "episode: 36800 loss tensor(1.0093, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6335105491250861\n",
      "gzsl: unseen=0.4795 , seen=0.7885 , h=0.5963\n",
      "____________________________________________________________________________________________________\n",
      "episode: 37000 loss tensor(2.8332, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6355700688669405\n",
      "gzsl: unseen=0.4829 , seen=0.7934 , h=0.6004\n",
      "____________________________________________________________________________________________________\n",
      "episode: 37200 loss tensor(0.9053, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6264652008273603\n",
      "gzsl: unseen=0.4806 , seen=0.7926 , h=0.5984\n",
      "____________________________________________________________________________________________________\n",
      "episode: 37400 loss tensor(0.7424, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6269443265833115\n",
      "gzsl: unseen=0.4811 , seen=0.7883 , h=0.5975\n",
      "____________________________________________________________________________________________________\n",
      "episode: 37600 loss tensor(1.3373, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6408997577493815\n",
      "gzsl: unseen=0.4798 , seen=0.7907 , h=0.5972\n",
      "____________________________________________________________________________________________________\n",
      "episode: 37800 loss tensor(1.6558, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.627556198346548\n",
      "gzsl: unseen=0.4777 , seen=0.7943 , h=0.5966\n",
      "____________________________________________________________________________________________________\n",
      "episode: 38000 loss tensor(1.1465, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6397680325609234\n",
      "gzsl: unseen=0.4727 , seen=0.8013 , h=0.5946\n",
      "____________________________________________________________________________________________________\n",
      "episode: 38200 loss tensor(0.9374, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.632773732080216\n",
      "gzsl: unseen=0.4759 , seen=0.7919 , h=0.5945\n",
      "____________________________________________________________________________________________________\n",
      "episode: 38400 loss tensor(1.8803, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6379480996629275\n",
      "gzsl: unseen=0.4869 , seen=0.7889 , h=0.6021\n",
      "____________________________________________________________________________________________________\n",
      "episode: 38600 loss tensor(1.9902, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6343069529898445\n",
      "gzsl: unseen=0.4829 , seen=0.7926 , h=0.6001\n",
      "____________________________________________________________________________________________________\n",
      "episode: 38800 loss tensor(1.1770, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.631816770782023\n",
      "gzsl: unseen=0.4796 , seen=0.7946 , h=0.5982\n",
      "____________________________________________________________________________________________________\n",
      "episode: 39000 loss tensor(1.1772, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6338508454314538\n",
      "gzsl: unseen=0.4896 , seen=0.7963 , h=0.6064\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 39200 loss tensor(1.6901, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6267112865695094\n",
      "gzsl: unseen=0.4851 , seen=0.7859 , h=0.5999\n",
      "____________________________________________________________________________________________________\n",
      "episode: 39400 loss tensor(0.7103, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6224840909991126\n",
      "gzsl: unseen=0.4710 , seen=0.7860 , h=0.5891\n",
      "____________________________________________________________________________________________________\n",
      "episode: 39600 loss tensor(1.0779, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6206307530006386\n",
      "gzsl: unseen=0.4670 , seen=0.7837 , h=0.5852\n",
      "____________________________________________________________________________________________________\n",
      "episode: 39800 loss tensor(1.4619, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6326706067030538\n",
      "gzsl: unseen=0.4833 , seen=0.7886 , h=0.5993\n",
      "____________________________________________________________________________________________________\n",
      "episode: 40000 loss tensor(0.9951, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6297081601763458\n",
      "gzsl: unseen=0.4642 , seen=0.7961 , h=0.5864\n",
      "____________________________________________________________________________________________________\n",
      "episode: 40200 loss tensor(1.2118, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6253478395268385\n",
      "gzsl: unseen=0.4718 , seen=0.7896 , h=0.5907\n",
      "____________________________________________________________________________________________________\n",
      "episode: 40400 loss tensor(1.9307, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6305597612788683\n",
      "gzsl: unseen=0.4833 , seen=0.7902 , h=0.5998\n",
      "____________________________________________________________________________________________________\n",
      "episode: 40600 loss tensor(2.0220, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6286603082625561\n",
      "gzsl: unseen=0.4785 , seen=0.7890 , h=0.5957\n",
      "____________________________________________________________________________________________________\n",
      "episode: 40800 loss tensor(1.6997, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6254665885608588\n",
      "gzsl: unseen=0.4791 , seen=0.7863 , h=0.5954\n",
      "____________________________________________________________________________________________________\n",
      "episode: 41000 loss tensor(1.4793, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6268227519123155\n",
      "gzsl: unseen=0.4683 , seen=0.7930 , h=0.5889\n",
      "____________________________________________________________________________________________________\n",
      "episode: 41200 loss tensor(1.5691, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6278928529503296\n",
      "gzsl: unseen=0.4648 , seen=0.7898 , h=0.5852\n",
      "____________________________________________________________________________________________________\n",
      "episode: 41400 loss tensor(1.4737, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6217359967037281\n",
      "gzsl: unseen=0.4646 , seen=0.7945 , h=0.5863\n",
      "____________________________________________________________________________________________________\n",
      "episode: 41600 loss tensor(0.5897, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6205914609224041\n",
      "gzsl: unseen=0.4707 , seen=0.7953 , h=0.5914\n",
      "____________________________________________________________________________________________________\n",
      "episode: 41800 loss tensor(1.2911, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6247932297423378\n",
      "gzsl: unseen=0.4736 , seen=0.7934 , h=0.5931\n",
      "____________________________________________________________________________________________________\n",
      "episode: 42000 loss tensor(1.6454, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6205622402964767\n",
      "gzsl: unseen=0.4703 , seen=0.7884 , h=0.5891\n",
      "____________________________________________________________________________________________________\n",
      "episode: 42200 loss tensor(1.4412, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6251163600841101\n",
      "gzsl: unseen=0.4722 , seen=0.7892 , h=0.5909\n",
      "____________________________________________________________________________________________________\n",
      "episode: 42400 loss tensor(1.7481, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6292349476993363\n",
      "gzsl: unseen=0.4808 , seen=0.7923 , h=0.5985\n",
      "____________________________________________________________________________________________________\n",
      "episode: 42600 loss tensor(1.8949, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6255113768394123\n",
      "gzsl: unseen=0.4834 , seen=0.7902 , h=0.5998\n",
      "____________________________________________________________________________________________________\n",
      "episode: 42800 loss tensor(1.6476, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6236173824743856\n",
      "gzsl: unseen=0.4811 , seen=0.7884 , h=0.5976\n",
      "____________________________________________________________________________________________________\n",
      "episode: 43000 loss tensor(2.1834, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6230514263635822\n",
      "gzsl: unseen=0.4679 , seen=0.7899 , h=0.5877\n",
      "____________________________________________________________________________________________________\n",
      "episode: 43200 loss tensor(2.2165, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6250582653876817\n",
      "gzsl: unseen=0.4770 , seen=0.7895 , h=0.5947\n",
      "____________________________________________________________________________________________________\n",
      "episode: 43400 loss tensor(1.8410, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6307590934808938\n",
      "gzsl: unseen=0.4793 , seen=0.7925 , h=0.5973\n",
      "____________________________________________________________________________________________________\n",
      "episode: 43600 loss tensor(1.5241, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6313695829995044\n",
      "gzsl: unseen=0.4760 , seen=0.7936 , h=0.5951\n",
      "____________________________________________________________________________________________________\n",
      "episode: 43800 loss tensor(1.6971, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6283997101758771\n",
      "gzsl: unseen=0.4774 , seen=0.7907 , h=0.5954\n",
      "____________________________________________________________________________________________________\n",
      "episode: 44000 loss tensor(1.2381, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6256507351761018\n",
      "gzsl: unseen=0.4763 , seen=0.7947 , h=0.5956\n",
      "____________________________________________________________________________________________________\n",
      "episode: 44200 loss tensor(1.1851, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6304348542903925\n",
      "gzsl: unseen=0.4831 , seen=0.7925 , h=0.6002\n",
      "____________________________________________________________________________________________________\n",
      "episode: 44400 loss tensor(0.8673, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6168838754510597\n",
      "gzsl: unseen=0.4699 , seen=0.7865 , h=0.5883\n",
      "____________________________________________________________________________________________________\n",
      "episode: 44600 loss tensor(1.7882, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6202519699164508\n",
      "gzsl: unseen=0.4718 , seen=0.7907 , h=0.5910\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 44800 loss tensor(1.0861, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6275280913491488\n",
      "gzsl: unseen=0.4728 , seen=0.7940 , h=0.5927\n",
      "____________________________________________________________________________________________________\n",
      "episode: 45000 loss tensor(0.7415, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6256306599855115\n",
      "gzsl: unseen=0.4770 , seen=0.7939 , h=0.5959\n",
      "____________________________________________________________________________________________________\n",
      "episode: 45200 loss tensor(1.5296, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.628114215601763\n",
      "gzsl: unseen=0.4848 , seen=0.7928 , h=0.6017\n",
      "____________________________________________________________________________________________________\n",
      "episode: 45400 loss tensor(1.2018, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6317706771263577\n",
      "gzsl: unseen=0.4899 , seen=0.7946 , h=0.6061\n",
      "____________________________________________________________________________________________________\n",
      "episode: 45600 loss tensor(2.0701, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6314206833648738\n",
      "gzsl: unseen=0.4889 , seen=0.7913 , h=0.6044\n",
      "____________________________________________________________________________________________________\n",
      "episode: 45800 loss tensor(1.7581, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6231028500536601\n",
      "gzsl: unseen=0.4740 , seen=0.7944 , h=0.5938\n",
      "____________________________________________________________________________________________________\n",
      "episode: 46000 loss tensor(1.7076, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6282871968607596\n",
      "gzsl: unseen=0.4814 , seen=0.7970 , h=0.6003\n",
      "____________________________________________________________________________________________________\n",
      "episode: 46200 loss tensor(1.4167, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6296085821892066\n",
      "gzsl: unseen=0.4855 , seen=0.7949 , h=0.6028\n",
      "____________________________________________________________________________________________________\n",
      "episode: 46400 loss tensor(1.3591, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6253788911346467\n",
      "gzsl: unseen=0.4870 , seen=0.7906 , h=0.6027\n",
      "____________________________________________________________________________________________________\n",
      "episode: 46600 loss tensor(1.0285, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6279202205603904\n",
      "gzsl: unseen=0.4904 , seen=0.7931 , h=0.6060\n",
      "____________________________________________________________________________________________________\n",
      "episode: 46800 loss tensor(1.1520, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6244173319784938\n",
      "gzsl: unseen=0.4711 , seen=0.7933 , h=0.5911\n",
      "____________________________________________________________________________________________________\n",
      "episode: 47000 loss tensor(1.1169, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6240395924297883\n",
      "gzsl: unseen=0.4776 , seen=0.7905 , h=0.5955\n",
      "____________________________________________________________________________________________________\n",
      "episode: 47200 loss tensor(2.9357, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6238140643847399\n",
      "gzsl: unseen=0.4803 , seen=0.7870 , h=0.5966\n",
      "____________________________________________________________________________________________________\n",
      "episode: 47400 loss tensor(2.0156, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6264424692424896\n",
      "gzsl: unseen=0.4851 , seen=0.7918 , h=0.6016\n",
      "____________________________________________________________________________________________________\n",
      "episode: 47600 loss tensor(1.5756, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6258891208233571\n",
      "gzsl: unseen=0.4776 , seen=0.7958 , h=0.5970\n",
      "____________________________________________________________________________________________________\n",
      "episode: 47800 loss tensor(1.6558, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6247909773581761\n",
      "gzsl: unseen=0.4767 , seen=0.7976 , h=0.5967\n",
      "____________________________________________________________________________________________________\n",
      "episode: 48000 loss tensor(2.1185, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6220339413921614\n",
      "gzsl: unseen=0.4707 , seen=0.7948 , h=0.5912\n",
      "____________________________________________________________________________________________________\n",
      "episode: 48200 loss tensor(0.6000, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.620157317340983\n",
      "gzsl: unseen=0.4707 , seen=0.7941 , h=0.5910\n",
      "____________________________________________________________________________________________________\n",
      "episode: 48400 loss tensor(1.2674, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6250062790136549\n",
      "gzsl: unseen=0.4819 , seen=0.7967 , h=0.6006\n",
      "____________________________________________________________________________________________________\n",
      "episode: 48600 loss tensor(1.4736, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6291525459955736\n",
      "gzsl: unseen=0.4820 , seen=0.7933 , h=0.5996\n",
      "____________________________________________________________________________________________________\n",
      "episode: 48800 loss tensor(2.6328, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6283707482611561\n",
      "gzsl: unseen=0.4846 , seen=0.7917 , h=0.6012\n",
      "____________________________________________________________________________________________________\n",
      "episode: 49000 loss tensor(1.4843, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6248741900717178\n",
      "gzsl: unseen=0.4789 , seen=0.7932 , h=0.5972\n",
      "____________________________________________________________________________________________________\n",
      "episode: 49200 loss tensor(0.9556, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6266606070978791\n",
      "gzsl: unseen=0.4759 , seen=0.7964 , h=0.5958\n",
      "____________________________________________________________________________________________________\n",
      "episode: 49400 loss tensor(2.3966, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6244917035265279\n",
      "gzsl: unseen=0.4783 , seen=0.7933 , h=0.5968\n",
      "____________________________________________________________________________________________________\n",
      "episode: 49600 loss tensor(1.0168, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6232618031305581\n",
      "gzsl: unseen=0.4730 , seen=0.7941 , h=0.5928\n",
      "____________________________________________________________________________________________________\n",
      "episode: 49800 loss tensor(0.9587, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6279981661559737\n",
      "gzsl: unseen=0.4824 , seen=0.7923 , h=0.5997\n",
      "____________________________________________________________________________________________________\n",
      "episode: 50000 loss tensor(1.7040, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6287612277512817\n",
      "gzsl: unseen=0.4772 , seen=0.7982 , h=0.5973\n",
      "____________________________________________________________________________________________________\n",
      "episode: 50200 loss tensor(1.2036, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6333692604592343\n",
      "gzsl: unseen=0.4796 , seen=0.7957 , h=0.5985\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 50400 loss tensor(1.8307, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6323157153400992\n",
      "gzsl: unseen=0.4793 , seen=0.8004 , h=0.5996\n",
      "____________________________________________________________________________________________________\n",
      "episode: 50600 loss tensor(1.0946, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6313981313444044\n",
      "gzsl: unseen=0.4825 , seen=0.7914 , h=0.5995\n",
      "____________________________________________________________________________________________________\n",
      "episode: 50800 loss tensor(1.2202, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6289271769176572\n",
      "gzsl: unseen=0.4825 , seen=0.7934 , h=0.6001\n",
      "____________________________________________________________________________________________________\n",
      "episode: 51000 loss tensor(3.4494, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6264546508911022\n",
      "gzsl: unseen=0.4670 , seen=0.7972 , h=0.5890\n",
      "____________________________________________________________________________________________________\n",
      "episode: 51200 loss tensor(1.5628, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6301272634491781\n",
      "gzsl: unseen=0.4754 , seen=0.7938 , h=0.5946\n",
      "____________________________________________________________________________________________________\n",
      "episode: 51400 loss tensor(1.2228, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6297044864784863\n",
      "gzsl: unseen=0.4766 , seen=0.7952 , h=0.5960\n",
      "____________________________________________________________________________________________________\n",
      "episode: 51600 loss tensor(1.7019, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.627516962192327\n",
      "gzsl: unseen=0.4758 , seen=0.7993 , h=0.5965\n",
      "____________________________________________________________________________________________________\n",
      "episode: 51800 loss tensor(0.8333, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6251180189457821\n",
      "gzsl: unseen=0.4737 , seen=0.7966 , h=0.5941\n",
      "____________________________________________________________________________________________________\n",
      "episode: 52000 loss tensor(1.1241, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6285887419880158\n",
      "gzsl: unseen=0.4789 , seen=0.7954 , h=0.5979\n",
      "____________________________________________________________________________________________________\n",
      "episode: 52200 loss tensor(1.4757, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6251649417422468\n",
      "gzsl: unseen=0.4704 , seen=0.7956 , h=0.5912\n",
      "____________________________________________________________________________________________________\n",
      "episode: 52400 loss tensor(2.4410, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6273449047277554\n",
      "gzsl: unseen=0.4774 , seen=0.7947 , h=0.5965\n",
      "____________________________________________________________________________________________________\n",
      "episode: 52600 loss tensor(1.5046, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6298337391307701\n",
      "gzsl: unseen=0.4817 , seen=0.7952 , h=0.6000\n",
      "____________________________________________________________________________________________________\n",
      "episode: 52800 loss tensor(1.8403, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.626717866994613\n",
      "gzsl: unseen=0.4746 , seen=0.7996 , h=0.5957\n",
      "____________________________________________________________________________________________________\n",
      "episode: 53000 loss tensor(2.4234, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6273522169471308\n",
      "gzsl: unseen=0.4728 , seen=0.7998 , h=0.5943\n",
      "____________________________________________________________________________________________________\n",
      "episode: 53200 loss tensor(1.6169, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6289264072417458\n",
      "gzsl: unseen=0.4672 , seen=0.7982 , h=0.5894\n",
      "____________________________________________________________________________________________________\n",
      "episode: 53400 loss tensor(2.4724, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6266418786505026\n",
      "gzsl: unseen=0.4709 , seen=0.7976 , h=0.5921\n",
      "____________________________________________________________________________________________________\n",
      "episode: 53600 loss tensor(1.5310, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6269753750462831\n",
      "gzsl: unseen=0.4634 , seen=0.7975 , h=0.5862\n",
      "____________________________________________________________________________________________________\n",
      "episode: 53800 loss tensor(0., device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6280344229219507\n",
      "gzsl: unseen=0.4706 , seen=0.7913 , h=0.5902\n",
      "____________________________________________________________________________________________________\n",
      "episode: 54000 loss tensor(2.2734, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6354432776818966\n",
      "gzsl: unseen=0.4824 , seen=0.7982 , h=0.6014\n",
      "____________________________________________________________________________________________________\n",
      "episode: 54200 loss tensor(2.0187, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6302502634552164\n",
      "gzsl: unseen=0.4736 , seen=0.7987 , h=0.5946\n",
      "____________________________________________________________________________________________________\n",
      "episode: 54400 loss tensor(1.5856, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6239652180358584\n",
      "gzsl: unseen=0.4711 , seen=0.7965 , h=0.5920\n",
      "____________________________________________________________________________________________________\n",
      "episode: 54600 loss tensor(2.5109, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6290789129622896\n",
      "gzsl: unseen=0.4753 , seen=0.7952 , h=0.5950\n",
      "____________________________________________________________________________________________________\n",
      "episode: 54800 loss tensor(0.8462, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6281145068800555\n",
      "gzsl: unseen=0.4774 , seen=0.7980 , h=0.5974\n",
      "____________________________________________________________________________________________________\n",
      "episode: 55000 loss tensor(0.7258, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6286306952512059\n",
      "gzsl: unseen=0.4709 , seen=0.7931 , h=0.5910\n",
      "____________________________________________________________________________________________________\n",
      "episode: 55200 loss tensor(1.3855, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6275630100498273\n",
      "gzsl: unseen=0.4596 , seen=0.8015 , h=0.5842\n",
      "____________________________________________________________________________________________________\n",
      "episode: 55400 loss tensor(1.7220, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6255776928043248\n",
      "gzsl: unseen=0.4712 , seen=0.7933 , h=0.5912\n",
      "____________________________________________________________________________________________________\n",
      "episode: 55600 loss tensor(0.8678, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6293183081764051\n",
      "gzsl: unseen=0.4714 , seen=0.7969 , h=0.5924\n",
      "____________________________________________________________________________________________________\n",
      "episode: 55800 loss tensor(5.4707, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6265788850716139\n",
      "gzsl: unseen=0.4798 , seen=0.7922 , h=0.5977\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 56000 loss tensor(0.7228, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6252028791819744\n",
      "gzsl: unseen=0.4746 , seen=0.7935 , h=0.5940\n",
      "____________________________________________________________________________________________________\n",
      "episode: 56200 loss tensor(1.2920, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6265484483672272\n",
      "gzsl: unseen=0.4716 , seen=0.7922 , h=0.5912\n",
      "____________________________________________________________________________________________________\n",
      "episode: 56400 loss tensor(1.4223, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6328830624724192\n",
      "gzsl: unseen=0.4727 , seen=0.7962 , h=0.5932\n",
      "____________________________________________________________________________________________________\n",
      "episode: 56600 loss tensor(0.1490, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6261458371076761\n",
      "gzsl: unseen=0.4656 , seen=0.7971 , h=0.5878\n",
      "____________________________________________________________________________________________________\n",
      "episode: 56800 loss tensor(1.5699, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6377215636158489\n",
      "gzsl: unseen=0.4855 , seen=0.7958 , h=0.6030\n",
      "____________________________________________________________________________________________________\n",
      "episode: 57000 loss tensor(1.2101, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6328740284475074\n",
      "gzsl: unseen=0.4835 , seen=0.8002 , h=0.6028\n",
      "____________________________________________________________________________________________________\n",
      "episode: 57200 loss tensor(1.2799, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6302112810632459\n",
      "gzsl: unseen=0.4805 , seen=0.7944 , h=0.5988\n",
      "____________________________________________________________________________________________________\n",
      "episode: 57400 loss tensor(2.2955, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6306135776427648\n",
      "gzsl: unseen=0.4719 , seen=0.7961 , h=0.5925\n",
      "____________________________________________________________________________________________________\n",
      "episode: 57600 loss tensor(0.9842, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6366193181363231\n",
      "gzsl: unseen=0.4831 , seen=0.7952 , h=0.6010\n",
      "____________________________________________________________________________________________________\n",
      "episode: 57800 loss tensor(1.2275, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6369486522226773\n",
      "gzsl: unseen=0.4797 , seen=0.7934 , h=0.5979\n",
      "____________________________________________________________________________________________________\n",
      "episode: 58000 loss tensor(1.6317, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6362996150675903\n",
      "gzsl: unseen=0.4833 , seen=0.7986 , h=0.6022\n",
      "____________________________________________________________________________________________________\n",
      "episode: 58200 loss tensor(0.6073, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.636472822806718\n",
      "gzsl: unseen=0.4823 , seen=0.7964 , h=0.6008\n",
      "____________________________________________________________________________________________________\n",
      "episode: 58400 loss tensor(0.7931, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6278336083242683\n",
      "gzsl: unseen=0.4731 , seen=0.7934 , h=0.5927\n",
      "____________________________________________________________________________________________________\n",
      "episode: 58600 loss tensor(2.3247, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6273001436838431\n",
      "gzsl: unseen=0.4704 , seen=0.7945 , h=0.5910\n",
      "____________________________________________________________________________________________________\n",
      "episode: 58800 loss tensor(1.2231, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6281879467637651\n",
      "gzsl: unseen=0.4777 , seen=0.7924 , h=0.5961\n",
      "____________________________________________________________________________________________________\n",
      "episode: 59000 loss tensor(1.2074, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6345677960413909\n",
      "gzsl: unseen=0.4840 , seen=0.7850 , h=0.5988\n",
      "____________________________________________________________________________________________________\n",
      "episode: 59200 loss tensor(1.4817, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6297093138194013\n",
      "gzsl: unseen=0.4786 , seen=0.7955 , h=0.5977\n",
      "____________________________________________________________________________________________________\n",
      "episode: 59400 loss tensor(1.1063, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.632578293040195\n",
      "gzsl: unseen=0.4796 , seen=0.7911 , h=0.5972\n",
      "____________________________________________________________________________________________________\n",
      "episode: 59600 loss tensor(1.4116, device='cuda:0')\n",
      "loss_zero_number=  3\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.629273452311413\n",
      "gzsl: unseen=0.4730 , seen=0.7889 , h=0.5914\n",
      "____________________________________________________________________________________________________\n",
      "episode: 59800 loss tensor(1.9234, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6342398178394917\n",
      "gzsl: unseen=0.4768 , seen=0.7954 , h=0.5962\n",
      "____________________________________________________________________________________________________\n",
      "episode: 60000 loss tensor(1.8336, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6339168030427084\n",
      "gzsl: unseen=0.4713 , seen=0.7962 , h=0.5921\n",
      "____________________________________________________________________________________________________\n",
      "episode: 60200 loss tensor(0.1694, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6324846230265344\n",
      "gzsl: unseen=0.4746 , seen=0.7946 , h=0.5943\n",
      "____________________________________________________________________________________________________\n",
      "episode: 60400 loss tensor(1.6630, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6276645195095971\n",
      "gzsl: unseen=0.4718 , seen=0.7950 , h=0.5922\n",
      "____________________________________________________________________________________________________\n",
      "episode: 60600 loss tensor(0.7956, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6307612617355097\n",
      "gzsl: unseen=0.4763 , seen=0.7943 , h=0.5955\n",
      "____________________________________________________________________________________________________\n",
      "episode: 60800 loss tensor(1.7935, device='cuda:0')\n",
      "loss_zero_number=  3\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6311181344135115\n",
      "gzsl: unseen=0.4777 , seen=0.7935 , h=0.5963\n",
      "____________________________________________________________________________________________________\n",
      "episode: 61000 loss tensor(1.0015, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6276922297578303\n",
      "gzsl: unseen=0.4646 , seen=0.7927 , h=0.5859\n",
      "____________________________________________________________________________________________________\n",
      "episode: 61200 loss tensor(0.9547, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.630538923626765\n",
      "gzsl: unseen=0.4786 , seen=0.7902 , h=0.5961\n",
      "____________________________________________________________________________________________________\n",
      "episode: 61400 loss tensor(2.5643, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6305647310368419\n",
      "gzsl: unseen=0.4817 , seen=0.7927 , h=0.5992\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 61600 loss tensor(1.2296, device='cuda:0')\n",
      "loss_zero_number=  3\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6261219543259424\n",
      "gzsl: unseen=0.4807 , seen=0.7890 , h=0.5975\n",
      "____________________________________________________________________________________________________\n",
      "episode: 61800 loss tensor(0.5193, device='cuda:0')\n",
      "loss_zero_number=  4\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6265365111129144\n",
      "gzsl: unseen=0.4758 , seen=0.7934 , h=0.5948\n",
      "____________________________________________________________________________________________________\n",
      "episode: 62000 loss tensor(2.4915, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6260019548113005\n",
      "gzsl: unseen=0.4784 , seen=0.7903 , h=0.5960\n",
      "____________________________________________________________________________________________________\n",
      "episode: 62200 loss tensor(1.7737, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6245094158225537\n",
      "gzsl: unseen=0.4763 , seen=0.7930 , h=0.5951\n",
      "____________________________________________________________________________________________________\n",
      "episode: 62400 loss tensor(1.2617, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6211499007298322\n",
      "gzsl: unseen=0.4738 , seen=0.7912 , h=0.5927\n",
      "____________________________________________________________________________________________________\n",
      "episode: 62600 loss tensor(1.4701, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6224814210551847\n",
      "gzsl: unseen=0.4705 , seen=0.7922 , h=0.5904\n",
      "____________________________________________________________________________________________________\n",
      "episode: 62800 loss tensor(1.4756, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6219773328472314\n",
      "gzsl: unseen=0.4667 , seen=0.7937 , h=0.5878\n",
      "____________________________________________________________________________________________________\n",
      "episode: 63000 loss tensor(2.1605, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6234935719058591\n",
      "gzsl: unseen=0.4696 , seen=0.7944 , h=0.5903\n",
      "____________________________________________________________________________________________________\n",
      "episode: 63200 loss tensor(1.1698, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6230707566469135\n",
      "gzsl: unseen=0.4669 , seen=0.7957 , h=0.5885\n",
      "____________________________________________________________________________________________________\n",
      "episode: 63400 loss tensor(0.8987, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6230598419408213\n",
      "gzsl: unseen=0.4693 , seen=0.7948 , h=0.5902\n",
      "____________________________________________________________________________________________________\n",
      "episode: 63600 loss tensor(1.1142, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6228012139792787\n",
      "gzsl: unseen=0.4618 , seen=0.7952 , h=0.5843\n",
      "____________________________________________________________________________________________________\n",
      "episode: 63800 loss tensor(1.2941, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6229693502537659\n",
      "gzsl: unseen=0.4569 , seen=0.7963 , h=0.5807\n",
      "____________________________________________________________________________________________________\n",
      "episode: 64000 loss tensor(1.0234, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6212550988327108\n",
      "gzsl: unseen=0.4578 , seen=0.7966 , h=0.5814\n",
      "____________________________________________________________________________________________________\n",
      "episode: 64200 loss tensor(1.8938, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6216828947429857\n",
      "gzsl: unseen=0.4572 , seen=0.7982 , h=0.5814\n",
      "____________________________________________________________________________________________________\n",
      "episode: 64400 loss tensor(0.3656, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6216892920618029\n",
      "gzsl: unseen=0.4570 , seen=0.7998 , h=0.5817\n",
      "____________________________________________________________________________________________________\n",
      "episode: 64600 loss tensor(1.6967, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6229926903140489\n",
      "gzsl: unseen=0.4611 , seen=0.7987 , h=0.5847\n",
      "____________________________________________________________________________________________________\n",
      "episode: 64800 loss tensor(0.8070, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6261089956074202\n",
      "gzsl: unseen=0.4713 , seen=0.7971 , h=0.5923\n",
      "____________________________________________________________________________________________________\n",
      "episode: 65000 loss tensor(0.4586, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6230124169630461\n",
      "gzsl: unseen=0.4720 , seen=0.7946 , h=0.5922\n",
      "____________________________________________________________________________________________________\n",
      "episode: 65200 loss tensor(2.3725, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6238968457510101\n",
      "gzsl: unseen=0.4660 , seen=0.7924 , h=0.5869\n",
      "____________________________________________________________________________________________________\n",
      "episode: 65400 loss tensor(0.9625, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6226803812793917\n",
      "gzsl: unseen=0.4727 , seen=0.7920 , h=0.5920\n",
      "____________________________________________________________________________________________________\n",
      "episode: 65600 loss tensor(1.9336, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6235666742524975\n",
      "gzsl: unseen=0.4724 , seen=0.7910 , h=0.5915\n",
      "____________________________________________________________________________________________________\n",
      "episode: 65800 loss tensor(0.7741, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.621295579919147\n",
      "gzsl: unseen=0.4698 , seen=0.7940 , h=0.5903\n",
      "____________________________________________________________________________________________________\n",
      "episode: 66000 loss tensor(2.1193, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.620332430494275\n",
      "gzsl: unseen=0.4688 , seen=0.7944 , h=0.5896\n",
      "____________________________________________________________________________________________________\n",
      "episode: 66200 loss tensor(0.9072, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.621014939784555\n",
      "gzsl: unseen=0.4689 , seen=0.7923 , h=0.5892\n",
      "____________________________________________________________________________________________________\n",
      "episode: 66400 loss tensor(0.7795, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6202895161621554\n",
      "gzsl: unseen=0.4718 , seen=0.7946 , h=0.5920\n",
      "____________________________________________________________________________________________________\n",
      "episode: 66600 loss tensor(1.9070, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6171135956846212\n",
      "gzsl: unseen=0.4689 , seen=0.7928 , h=0.5892\n",
      "____________________________________________________________________________________________________\n",
      "episode: 66800 loss tensor(1.1049, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6177736291337187\n",
      "gzsl: unseen=0.4727 , seen=0.7948 , h=0.5928\n",
      "____________________________________________________________________________________________________\n",
      "episode: 67000 loss tensor(1.6228, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6224905437719499\n",
      "gzsl: unseen=0.4743 , seen=0.7953 , h=0.5942\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 67200 loss tensor(1.1336, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6226151008540127\n",
      "gzsl: unseen=0.4773 , seen=0.7959 , h=0.5967\n",
      "____________________________________________________________________________________________________\n",
      "episode: 67400 loss tensor(1.4853, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6203260355123221\n",
      "gzsl: unseen=0.4756 , seen=0.7922 , h=0.5944\n",
      "____________________________________________________________________________________________________\n",
      "episode: 67600 loss tensor(1.4368, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.622115304629551\n",
      "gzsl: unseen=0.4774 , seen=0.7916 , h=0.5956\n",
      "____________________________________________________________________________________________________\n",
      "episode: 67800 loss tensor(0.7718, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6209949525095138\n",
      "gzsl: unseen=0.4724 , seen=0.7919 , h=0.5918\n",
      "____________________________________________________________________________________________________\n",
      "episode: 68000 loss tensor(1.2346, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6200114470044973\n",
      "gzsl: unseen=0.4721 , seen=0.7936 , h=0.5920\n",
      "____________________________________________________________________________________________________\n",
      "episode: 68200 loss tensor(0.1516, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6207213604112235\n",
      "gzsl: unseen=0.4748 , seen=0.7930 , h=0.5939\n",
      "____________________________________________________________________________________________________\n",
      "episode: 68400 loss tensor(1.1335, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6222773217744112\n",
      "gzsl: unseen=0.4698 , seen=0.7959 , h=0.5909\n",
      "____________________________________________________________________________________________________\n",
      "episode: 68600 loss tensor(1.9036, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6240016032107445\n",
      "gzsl: unseen=0.4739 , seen=0.7941 , h=0.5936\n",
      "____________________________________________________________________________________________________\n",
      "episode: 68800 loss tensor(0.4224, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6273907195912255\n",
      "gzsl: unseen=0.4777 , seen=0.7933 , h=0.5964\n",
      "____________________________________________________________________________________________________\n",
      "episode: 69000 loss tensor(1.2592, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6286428552861437\n",
      "gzsl: unseen=0.4829 , seen=0.7948 , h=0.6008\n",
      "____________________________________________________________________________________________________\n",
      "episode: 69200 loss tensor(1.2887, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6261226244051625\n",
      "gzsl: unseen=0.4809 , seen=0.7929 , h=0.5987\n",
      "____________________________________________________________________________________________________\n",
      "episode: 69400 loss tensor(1.1476, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6232855299597954\n",
      "gzsl: unseen=0.4746 , seen=0.7922 , h=0.5936\n",
      "____________________________________________________________________________________________________\n",
      "episode: 69600 loss tensor(1.2359, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6262030330511583\n",
      "gzsl: unseen=0.4761 , seen=0.7934 , h=0.5951\n",
      "____________________________________________________________________________________________________\n",
      "episode: 69800 loss tensor(1.4597, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6240162556346429\n",
      "gzsl: unseen=0.4762 , seen=0.7929 , h=0.5950\n",
      "____________________________________________________________________________________________________\n",
      "episode: 70000 loss tensor(0.5093, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6268383725644182\n",
      "gzsl: unseen=0.4796 , seen=0.7917 , h=0.5973\n",
      "____________________________________________________________________________________________________\n",
      "episode: 70200 loss tensor(0.3764, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6234654305223096\n",
      "gzsl: unseen=0.4717 , seen=0.7912 , h=0.5910\n",
      "____________________________________________________________________________________________________\n",
      "episode: 70400 loss tensor(1.0895, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6211575681392899\n",
      "gzsl: unseen=0.4690 , seen=0.7920 , h=0.5891\n",
      "____________________________________________________________________________________________________\n",
      "episode: 70600 loss tensor(1.5506, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6212639902116223\n",
      "gzsl: unseen=0.4685 , seen=0.7905 , h=0.5883\n",
      "____________________________________________________________________________________________________\n",
      "episode: 70800 loss tensor(0.7981, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6209205023010334\n",
      "gzsl: unseen=0.4669 , seen=0.7925 , h=0.5876\n",
      "____________________________________________________________________________________________________\n",
      "episode: 71000 loss tensor(0.9668, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6201524397356366\n",
      "gzsl: unseen=0.4654 , seen=0.7931 , h=0.5866\n",
      "____________________________________________________________________________________________________\n",
      "episode: 71200 loss tensor(0.9414, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6212960708354848\n",
      "gzsl: unseen=0.4688 , seen=0.7925 , h=0.5891\n",
      "____________________________________________________________________________________________________\n",
      "episode: 71400 loss tensor(1.5385, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6250594951524\n",
      "gzsl: unseen=0.4758 , seen=0.7910 , h=0.5942\n",
      "____________________________________________________________________________________________________\n",
      "episode: 71600 loss tensor(0.6426, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6180096344036912\n",
      "gzsl: unseen=0.4625 , seen=0.7888 , h=0.5831\n",
      "____________________________________________________________________________________________________\n",
      "episode: 71800 loss tensor(1.3365, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6248471251164682\n",
      "gzsl: unseen=0.4709 , seen=0.7936 , h=0.5911\n",
      "____________________________________________________________________________________________________\n",
      "episode: 72000 loss tensor(1.7811, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6305730527664946\n",
      "gzsl: unseen=0.4739 , seen=0.7962 , h=0.5942\n",
      "____________________________________________________________________________________________________\n",
      "episode: 72200 loss tensor(1.1505, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6259808528474923\n",
      "gzsl: unseen=0.4704 , seen=0.7925 , h=0.5904\n",
      "____________________________________________________________________________________________________\n",
      "episode: 72400 loss tensor(1.2061, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6290092080345226\n",
      "gzsl: unseen=0.4756 , seen=0.7936 , h=0.5948\n",
      "____________________________________________________________________________________________________\n",
      "episode: 72600 loss tensor(1.7277, device='cuda:0')\n",
      "loss_zero_number=  3\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6277208439836187\n",
      "gzsl: unseen=0.4777 , seen=0.7916 , h=0.5958\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 72800 loss tensor(2.0477, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6289376731825099\n",
      "gzsl: unseen=0.4765 , seen=0.7978 , h=0.5966\n",
      "____________________________________________________________________________________________________\n",
      "episode: 73000 loss tensor(0.9898, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6270140394555972\n",
      "gzsl: unseen=0.4743 , seen=0.7928 , h=0.5935\n",
      "____________________________________________________________________________________________________\n",
      "episode: 73200 loss tensor(0.8999, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6300261983292618\n",
      "gzsl: unseen=0.4740 , seen=0.7982 , h=0.5948\n",
      "____________________________________________________________________________________________________\n",
      "episode: 73400 loss tensor(0.9914, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6277503301961114\n",
      "gzsl: unseen=0.4690 , seen=0.7969 , h=0.5905\n",
      "____________________________________________________________________________________________________\n",
      "episode: 73600 loss tensor(0.4232, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6262537141858635\n",
      "gzsl: unseen=0.4667 , seen=0.7989 , h=0.5892\n",
      "____________________________________________________________________________________________________\n",
      "episode: 73800 loss tensor(1.4619, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6261103116218671\n",
      "gzsl: unseen=0.4718 , seen=0.7984 , h=0.5931\n",
      "____________________________________________________________________________________________________\n",
      "episode: 74000 loss tensor(1.2742, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6245585200101886\n",
      "gzsl: unseen=0.4696 , seen=0.7955 , h=0.5906\n",
      "____________________________________________________________________________________________________\n",
      "episode: 74200 loss tensor(1.5744, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6238148862167915\n",
      "gzsl: unseen=0.4743 , seen=0.7964 , h=0.5946\n",
      "____________________________________________________________________________________________________\n",
      "episode: 74400 loss tensor(0.7630, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.625781604729562\n",
      "gzsl: unseen=0.4695 , seen=0.8000 , h=0.5918\n",
      "____________________________________________________________________________________________________\n",
      "episode: 74600 loss tensor(1.5428, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6260795867899299\n",
      "gzsl: unseen=0.4723 , seen=0.7970 , h=0.5932\n",
      "____________________________________________________________________________________________________\n",
      "episode: 74800 loss tensor(1.3796, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6229092027731424\n",
      "gzsl: unseen=0.4647 , seen=0.7976 , h=0.5873\n",
      "____________________________________________________________________________________________________\n",
      "episode: 75000 loss tensor(0.2749, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.624020309606677\n",
      "gzsl: unseen=0.4691 , seen=0.7952 , h=0.5901\n",
      "____________________________________________________________________________________________________\n",
      "episode: 75200 loss tensor(1.3932, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.625641909553858\n",
      "gzsl: unseen=0.4680 , seen=0.7979 , h=0.5899\n",
      "____________________________________________________________________________________________________\n",
      "episode: 75400 loss tensor(1.00000e-02 *\n",
      "       8.1015, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6290477028938758\n",
      "gzsl: unseen=0.4705 , seen=0.7995 , h=0.5924\n",
      "____________________________________________________________________________________________________\n",
      "episode: 75600 loss tensor(1.9033, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6299700933740772\n",
      "gzsl: unseen=0.4720 , seen=0.7984 , h=0.5933\n",
      "____________________________________________________________________________________________________\n",
      "episode: 75800 loss tensor(1.4299, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6280403026540746\n",
      "gzsl: unseen=0.4704 , seen=0.7963 , h=0.5914\n",
      "____________________________________________________________________________________________________\n",
      "episode: 76000 loss tensor(3.0546, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.630204091997798\n",
      "gzsl: unseen=0.4723 , seen=0.7967 , h=0.5931\n",
      "____________________________________________________________________________________________________\n",
      "episode: 76200 loss tensor(0.7251, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6300916946427837\n",
      "gzsl: unseen=0.4736 , seen=0.7971 , h=0.5942\n",
      "____________________________________________________________________________________________________\n",
      "episode: 76400 loss tensor(1.7395, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6295276005884259\n",
      "gzsl: unseen=0.4797 , seen=0.7933 , h=0.5979\n",
      "____________________________________________________________________________________________________\n",
      "episode: 76600 loss tensor(0.2426, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.63200226315658\n",
      "gzsl: unseen=0.4799 , seen=0.7938 , h=0.5982\n",
      "____________________________________________________________________________________________________\n",
      "episode: 76800 loss tensor(1.4770, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6257904410329311\n",
      "gzsl: unseen=0.4702 , seen=0.7952 , h=0.5910\n",
      "____________________________________________________________________________________________________\n",
      "episode: 77000 loss tensor(1.1392, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6272915573568193\n",
      "gzsl: unseen=0.4739 , seen=0.7947 , h=0.5937\n",
      "____________________________________________________________________________________________________\n",
      "episode: 77200 loss tensor(2.1478, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6241790750864348\n",
      "gzsl: unseen=0.4726 , seen=0.7932 , h=0.5923\n",
      "____________________________________________________________________________________________________\n",
      "episode: 77400 loss tensor(1.3911, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6248097306206486\n",
      "gzsl: unseen=0.4733 , seen=0.7962 , h=0.5937\n",
      "____________________________________________________________________________________________________\n",
      "episode: 77600 loss tensor(1.6395, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6272762164620579\n",
      "gzsl: unseen=0.4831 , seen=0.7960 , h=0.6013\n",
      "____________________________________________________________________________________________________\n",
      "episode: 77800 loss tensor(2.4545, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6247634874447009\n",
      "gzsl: unseen=0.4722 , seen=0.7956 , h=0.5927\n",
      "____________________________________________________________________________________________________\n",
      "episode: 78000 loss tensor(1.3964, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6235603954486285\n",
      "gzsl: unseen=0.4740 , seen=0.7934 , h=0.5934\n",
      "____________________________________________________________________________________________________\n",
      "episode: 78200 loss tensor(1.3859, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6216440024689752\n",
      "gzsl: unseen=0.4716 , seen=0.7933 , h=0.5916\n",
      "____________________________________________________________________________________________________\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "episode: 78400 loss tensor(1.5708, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6220442749133093\n",
      "gzsl: unseen=0.4736 , seen=0.7919 , h=0.5927\n",
      "____________________________________________________________________________________________________\n",
      "episode: 78600 loss tensor(1.9030, device='cuda:0')\n",
      "loss_zero_number=  2\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6192026148824982\n",
      "gzsl: unseen=0.4658 , seen=0.7943 , h=0.5873\n",
      "____________________________________________________________________________________________________\n",
      "episode: 78800 loss tensor(1.9176, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.6204953795342876\n",
      "gzsl: unseen=0.4647 , seen=0.7949 , h=0.5866\n",
      "____________________________________________________________________________________________________\n",
      "episode: 79000 loss tensor(1.3742, device='cuda:0')\n",
      "loss_zero_number=  0\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n",
      "class num: 50\n",
      "zsl: 0.619426856149898\n",
      "gzsl: unseen=0.4646 , seen=0.7954 , h=0.5866\n",
      "____________________________________________________________________________________________________\n",
      "episode: 79200 loss tensor(1.5669, device='cuda:0')\n",
      "loss_zero_number=  1\n",
      "Testing...\n",
      "class num: 10\n",
      "class num: 50\n"
     ]
    }
   ],
   "source": [
    "print(\"training...\")\n",
    "last_accuracy = 0.0\n",
    "loss_zero_num =0\n",
    "#writer = SummaryWriter()\n",
    "#vis = visdom.Visdom()\n",
    "for episode in range(EPISODE):\n",
    "\n",
    "    attribute_network_scheduler.step(episode)\n",
    "    metric_network_scheduler.step(episode)\n",
    "\n",
    "    train_loader = DataLoader(train_data, batch_size=BATCH_SIZE, shuffle=True)\n",
    "\n",
    "    batch_labels, batch_features = train_loader.__iter__().next()\n",
    "    batch_id = np.unique(batch_labels)\n",
    "\n",
    "    batch_attributes = torch.Tensor([all_attributes[i] for i in batch_id]).squeeze(1)\n",
    "    batch_features_ext = torch.from_numpy(batch_features.numpy().repeat(batch_id.size, 0))\n",
    "    batch_attributes_ext = batch_attributes.repeat(BATCH_SIZE, 1)\n",
    "\n",
    "    batch_features_ext = Variable(batch_features_ext).cuda(GPU).float()  # 32*2048\n",
    "    batch_attributes_ext = Variable(batch_attributes_ext).cuda(GPU)\n",
    "\n",
    "\n",
    "    re_batch_labels = []\n",
    "    for label in batch_labels.numpy():\n",
    "        index = np.argwhere(batch_id == label)\n",
    "        re_batch_labels.append(index[0][0])\n",
    "    re_batch_labels = torch.cuda.LongTensor(re_batch_labels)\n",
    "    re_batch_labels = Variable(re_batch_labels).cuda(GPU)\n",
    "    \n",
    "\n",
    "    criterion = HardTripletLoss2(margin = Margin).cuda(GPU)\n",
    "    triplet_loss= criterion(metric_network(attribute_network(batch_attributes_ext)), \n",
    "                            metric_network(batch_features_ext), re_batch_labels)\n",
    "    if triplet_loss == 0:\n",
    "        loss_zero_num = loss_zero_num + 1\n",
    "    \n",
    "    \n",
    "    attribute_network.zero_grad()\n",
    "    metric_network.zero_grad()\n",
    "    \n",
    "    triplet_loss.backward()\n",
    "    \n",
    "    attribute_network_optim.step()\n",
    "    metric_network_optim.step()\n",
    "\n",
    "    \n",
    "    if (episode+1)%200 == 0 or episode==0:\n",
    "        print(\"episode:\", episode+1, \"loss\", triplet_loss)\n",
    "        print('loss_zero_number= ',loss_zero_num)\n",
    "        loss_zero_num = 0\n",
    "        #writer.add_scalar('data/loss', triplet_loss, episode)\n",
    "    \n",
    "    if (episode+1)%200 == 0 or episode==0:\n",
    "        print(\"Testing...\")\n",
    "        #attribute_network.eval()\n",
    "        zsl_accuracy = compute_accuracy_per_class(test_features, test_label, test_id, test_attributes)\n",
    "        gzsl_unseen_accuracy = compute_accuracy_per_class(test_features, test_label, np.arange(50), attributes)\n",
    "        gzsl_seen_accuracy = compute_accuracy_per_class(test_seen_features, test_seen_label, np.arange(50), attributes)\n",
    "        H = 2 * gzsl_seen_accuracy * gzsl_unseen_accuracy / (gzsl_unseen_accuracy + gzsl_seen_accuracy)\n",
    "        #H2 = 2 * gzsl_seen_accuracy2 * gzsl_unseen_accuracy2 / (gzsl_unseen_accuracy2 + gzsl_seen_accuracy2)\n",
    "        print('zsl:', zsl_accuracy)\n",
    "        #print('zsl:', zsl_accuracy2)\n",
    "        print('gzsl: unseen=%.4f , seen=%.4f , h=%.4f' % (gzsl_unseen_accuracy , gzsl_seen_accuracy, H))\n",
    "        #print('gzsl: unseen=%.4f , seen=%.4f , h=%.4f' % (gzsl_unseen_accuracy2 , gzsl_seen_accuracy2, H2))\n",
    "        print('_'*100)\n",
    "        #writer.add_scalar('data/zsl_accuracy', zsl_accuracy, episode)\n",
    "        #writer.add_scalar('data/gzsl_unseen_accuracy', gzsl_unseen_accuracy, episode)\n",
    "        #writer.add_scalar('data/gzsl_seen_accuracy', gzsl_seen_accuracy, episode)\n",
    "        #writer.add_scalar('data/H', H, episode)\n",
    "#features = images.view(, 784)\n",
    "#print(vis_label.size())\n",
    "#writer.add_embedding(vis_images, metadata = vis_label.tolist())\n",
    "#writer.add_embedding(vis_att, metadata = vis_label_att)\n",
    "#writer.export_scalars_to_json(\"./test.json\")\n",
    "#writer.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "hide_input": false,
  "kernelspec": {
   "display_name": "pytorch",
   "language": "python",
   "name": "pytorch"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
